#ifndef BULLET_H
#define BULLET_H

#include "drawable.h"
#include "physicsable.h"

#include <queue>

class Bullet : public Drawable, public Physicsable {
	private:
		float r;
		float g;
		float b;

		cpVect * vertii_;
		int numVertii_;
		
		Bullet()
		: Drawable(2),
		  Physicsable() {}

	public:
		Bullet(float mass, cpVect pos, float angle, cpVect vel)
		: Drawable(2),
		  Physicsable(BULLET, mass) {
			numVertii_ = 4;
			vertii_ = new cpVect[numVertii_];
			vertii_[0].x =  0.25; vertii_[0].y =  1.0;
			vertii_[1].x =  0.25; vertii_[1].y = -1.0;
			vertii_[2].x = -0.25; vertii_[2].y = -1.0;
			vertii_[3].x = -0.25; vertii_[3].y =  1.0;

			//Zero mass because we have already set this physicsables mass in the constructor
			addPolyShape(0.0, numVertii_, vertii_, cpvzero);
			
			getBody()->p = pos;
			getBody()->a = angle;
			getBody()->v = vel;

			r = 0.6;
			g = 0.6;
			b = 0.6;
		}
		
		void draw();
};

#endif
